<template>
  <div>
    <van-nav-bar title="捡漏专区" left-arrow @click-left="onClickLeft" />
    <div >
      <img src="http://articleimg.xbiao.com/2019/0723/350_224_201907231563878243257.jpg" style="width:100%;height:3rem"/>
    </div>
    <div class="like">
      <van-card
        style="width:50%"
        v-for="item1 in list"
        :price="item1.platformPrice"
        :desc="item1.goodsDetail"
        :title="item1.goodsName"
        :thumb="item1.imageUrl"
        @click="tap6(item1.goodsId)"
      />
    </div>
  </div>
</template>
<script>
import axios from "axios";
export default {
  data() {
    return {
      list: []
    };
  },
  methods: {
    onClickLeft() {
      this.$router.go(-1);
    },
     tap6(id) {
      this.$router.push("/details/"+id);
    },
  },
  mounted() {
    // var _this = this;
    // axios({
    //   url: "http://10.8.157.39:8080/secluxury/goods/brandlist",
    // }).then(data => {
    //   console.log(data);
    //   this.list = data.data;
    // });
    axios({
      // url: "http://10.8.157.39:8080/secluxury/type/brandGoodsList "
      url: "http://47.102.221.184:8083/secluxury/type/brandGoodsList"
    })
      .then(data => {
        // console.log(data.data);
        var a = data.data;
        a.map(goods => {
          // console.log(goods.goodsList);
          goods.goodsList.map(yahu => {
            this.list.push(yahu);
            // console.log(yahu);
            // console.log(this.list);
          });
        });
      })
      .catch(err => {
        // console.log(err);
      });
  }
};
</script>
<style scoped>
.like {
  overflow: auto;
  height: 12rem;
  padding: 0 0.01rem;
  display: flex;
  flex-wrap: wrap;
}
</style>
